{include file="Public:header" /}
{include file="Public:nav" /}	
		<div class="bar bar-nav">
			<h1 class="title">发布预约</h1>
			<i class="icon icon-left" onclick="window.history.go(-1);"></i>
		</div>

		<div class="content">
			
			<div class="row activity_list publish_list">
				<div class="col-100">
					<div class="list-block">
                                            <form id="submitForm" class="sui-form form-horizontal" onsubmit="return false;">
						<ul class="input-daterange">
							<input type="hidden" name='id' value="{$value['id']}">
							<li class="item-content">
								<div class="item-media"><i class="iconfont icon-phone"></i></div>
								<div class="item-inner">
									<div class="item-input">
                                                                            <input type="text" name='mobile' placeholder="联系方式" value="{$value['mobile']}">
									</div>
								</div>
							</li>
							<li class="item-content yuyue_checkbox">
                                                                <label><input type="checkbox" {if condition="in_array(1, $value['select_time'])"} checked="checked" {/if} name="select_time[]" value='1'>星期一</label>
								<label><input type="checkbox" {if condition="in_array(2, $value['select_time'])"} checked="checked" {/if} name="select_time[]" value='2'>星期二</label>
								<label><input type="checkbox" {if condition="in_array(3, $value['select_time'])"} checked="checked" {/if} name="select_time[]" value='3'>星期三</label>
								<label><input type="checkbox" {if condition="in_array(4, $value['select_time'])"} checked="checked" {/if} name="select_time[]" value='4'>星期四</label>
								<label><input type="checkbox" {if condition="in_array(5, $value['select_time'])"} checked="checked" {/if} name="select_time[]" value='5'>星期五</label>
								<label><input type="checkbox" {if condition="in_array(6, $value['select_time'])"} checked="checked" {/if} name="select_time[]" value='6'>星期六</label>
								<label><input type="checkbox" {if condition="in_array(0, $value['select_time'])"} checked="checked" {/if} name="select_time[]" value='0'>星期日</label>
							</li>
                                                        {if condition="$status_show"}
                                                        <li class="item-content">
								<div class="item-media">审核状态：</div>
								<div class="item-inner">
									<div class="item-input">
										{switch name="value['trial_status']"}
                                                                                    {case value="1"}<font color="#de9c00">待审核</font>{/case}
                                                                                      {case value="2"}<font color="#0894ec">审核通过</font>{/case}
                                                                                      {case value="3"}<font color="#f00">不通过</font>{/case}
                                                                                    {/switch}
									</div>
								</div>
							</li>
                                                        {/if}
                                                        {if condition="$value['trial_status'] eq 3"}
                                                        <li class="item-content" style="">
								<div class="item-media">原因：</div>
								<div class="item-inner">
									<div class="item-input">
										{$value['reason']}
									</div>
								</div>
							</li>
							{/if}
						</ul>
						<div class="publish_bottom">
                                                    <a href="javascript:void(0);" id="submitbutton" class="create-actions button button-fill">确定</a>
						</div>
                                            </form>
					</div>
				</div>
			</div>
		</div>
		
			
		{include file="Public:footer" /}
                <script src="__PUBLIC__/Admin/plugins/layer/layer.js"></script>
		<script>
			Zepto(function(){
				'use strict';
				Zepto("#time_1").datetimePicker({
    			value: ['2017', '12', '04', '8',"00"],
  				});
  				Zepto("#time_2").datetimePicker({
    			value: ['2017', '12', '04', '9',"00"],
  				});
  				
  				Zepto(".input_map").cityPicker({
				    toolbarTemplate: '<header class="bar bar-nav"><button class="button button-link pull-right close-picker">确定</button>\<h1 class="title">选择活动地点</h1>\</header>'
				});
				
			});
			var swiper = new Swiper('.swiper-container', {
				pagination: '.swiper-pagination',
				paginationClickable: true
			});
			
			jQuery(document).ready(function(){
				$(".yuyue_button li a").on("click",function(){
					$(this).toggleClass("active");
				});
			});
                        
                        $('#submitbutton').click(function(){
                            $.ajax({
                                url:"{:U('Users/user_expert_yuyue')}",
                                dataType:'json',
                                type:'post',
                                data:$('#submitForm').serialize(),
                                success:function(data){
                                    console.log(data);
                                    if(data.status==1){
                                        Zepto.confirm(data.message, '温馨提示',function(){
                                            window.location.href="{:U('Users/index')}";
                                        });
                                        return false;
                                    }else if(data.status==2){
                                        Zepto.toast(data.message, 2000, 'success top');
                                        return false;
                                    }else if(data.status==3){
                                        Zepto.confirm(data.message, '温馨提示',function(){
                                            window.location.href="{:U('Apply/expert_join')}";
                                        });
                                        return false;
//                                        layer.confirm(data.message,{btn:['立即申请','不了'],icon:3,closeBtn:2},function(){
//                                            window.location.href="{:U('Apply/expert_join')}";
//                                        });
                                    }
                                }
                            });
                        });
		</script>
<script type="text/javascript">
$(document).ready(function(){
    var val = "{$value['select_time']}";
//    alert(val);
    $(val).each(function(){
      alert(123)
    });
});
</script>
	</body>

</html>